<template>
  <div>
    <!-- 收藏 返回 -->
    <div>
      <van-nav-bar
        title="收藏"
        left-text="返回"
        left-arrow
        @click-left="$router.go(-1)"
        type="primary"
      />
    </div>
    <!-- 表单 -->
    <!-- <van-list
      v-model="loading"
      :finished="finished"
      finished-text="没有更多了"
      @load="onLoad"
    >
      <div class="dahezi">
        <div class="zfd">
          <img :src="list.houseImg" alt="" />
        </div>
        <div class="yfd">
          <h3 class="">{{ list.title }}</h3>
          <div>{{ list.desc }}</div>
          <div> {{list.tags}} </div>
          <div>{{list.price}}元/月</div>
        </div>
      </div>
      <van-cell v-for="item in list" :key="item" :title="item" />
    </van-list> -->
    <div class="yfd" v-for="list in list" :key="list.id">
      <div class="dahezi">
        <div class="zfd">
          <img :src="list.houseImg" alt="" />
        </div>
        <div class="yfd">
          <h3 class="">{{ list.title }}</h3>
          <div>{{ list.desc }}</div>
          <div>{{ list.tags }}</div>
          <div>{{ list.price }}元/月</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getFavorites } from '@/api/article'
export default {
  data () {
    return {
      list: [],
      loading: false,
      finished: false,
      page: 1
    }
  },
  methods: {},
  async created () {
    const { body } = await getFavorites()
    console.log(body)
    this.list = body
  }
}
</script>

<style lang="less">
.dahezi {
  height: 120px;
  // background-color: #000;
  border: 1px solid #000;
  img {
    width: 100px;
    height: 100px;
  }
}
</style>
